<?php
	require_once('../utils/query.php');

$criteria = $_POST["criteria"];

?>
<table>
	<?php
		$result = execute_query("SELECT * FROM StoreItems WHERE price<='%s'", $criteria);
		while ($row = mysql_fetch_array($cards_result))
		{
			$storeitemid = $row[0];
			$name = $row[1];
			$description = $row[2];
			$price = $row[3];
	?>
			<tr>
				<?php echo('<td class="storeitemid" hidden>$storeitemid</td>'); ?>
				<?php echo('<td class="name">$name</td>'); ?>
				<?php echo('<td class="description">$description</td>'); ?>
				<?php echo('<td class="price">$price</td>'); ?>
			</tr>
	<?php
		}
	?>
</table>
